
This resource address modifies the properties of the named database. The list of modifiable properties can be returned by the GET version of this endpoint. The database can be identified either by id or name. For an example, see Preliminary Configuration Procedures in the Scripting Administrative Tasks Guide.
| URL Parameters | |
|---|---|
| format | The format of the returned data. Can be either
json or xml (default). This parameter overrides the Accept
header if both are present. |
| Request Headers | |
|---|---|
| Accept | The expected MIME type of the returned data. If
the format parameter is present, it takes precedence over the Accept header. |
Upon success, MarkLogic Server returns status code 204 (No content). If the payload is malformed or the group does not exist, a status code of 400 (Bad Request) is returned. A status code of 401 (Unauthorized) is returned if the user does not have the necessary privileges.
manage-user rolehttp://marklogic.com/xdmp/privileges/manage
manage role plus one of the following granular privileges:
http://marklogic.com/xdmp/privileges/admin/database/database-IDhttp://marklogic.com/xdmp/privileges/admin/database/activity/database-IDwhere activity is one of the following:
Database-level replication can be changed with the database-replication properties
of the database. Specify foreign-replica(s) on the replica database(s) and foreign-master on
the master database.
If a forest is specified in the retired-forest property, it will be marked as retired.
Note: The properties described here are for XML payloads. In general they are the same for
JSON, with the exception that, in JSON, forests, word-lexicons,
merge-blackouts, days, database-backups,
backup-days, fragment-roots, fragment-parents,
element-word-query-throughs, phrase-throughs,
phrase-arounds, range-element-indexes,
range-element-attribute-indexes, element-word-lexicons,
element-attribute-word-lexicons, path-namespaces,
range-path-indexes, fields, field-paths,
included-elements, excluded-elements,
tokenizer-overrides, range-field-indexes,
geospatial-element-indexes, geospatial-element-child-indexes,
geospatial-element-pair-indexes,
geospatial-element-attribute-pair-indexes,
geospatial-path-indexes, default-rulesets,
foreign-replicas, and database-reference are expressed in
singular form. For example, in JSON, forests is instead forest and
the format is: "forest":["forest-id"].
database-nameenabledsecurity-databaseschema-databasetriggers-databasedata-encryptionbackup-encryption-keyencryption-key-idforestsThis is a complex structure with the following children:
forestsubdatabasesThis is a complex structure with the following children:
subdatabaseThis is a complex structure with the following children:
cluster-namedatabase-nameretired-forestsThis is a complex structure with the following children:
retired-forestretired-forest-countlanguagestemmed-searchesword-searchesword-positionsfast-phrase-searchesfast-reverse-searchestriple-indextriple-positionsfast-case-sensitive-searchesfast-diacritic-sensitive-searchesfast-element-word-searcheselement-word-positionsfast-element-phrase-searcheselement-value-positionsattribute-value-positionsfield-value-searchesfield-value-positionsthree-character-searchesthree-character-word-positionsfast-element-character-searchestrailing-wildcard-searchestrailing-wildcard-word-positionsfast-element-trailing-wildcard-searchesword-lexiconsThis is a complex structure with the following children:
word-lexicontwo-character-searchesone-character-searchesuri-lexiconcollection-lexiconreindexer-enablereindexer-throttlereindexer-timestampdirectory-creationmaintain-last-modifiedmaintain-directory-last-modifiedinherit-permissionsinherit-collectionsinherit-qualityin-memory-limitin-memory-list-sizein-memory-tree-sizein-memory-range-index-sizein-memory-reverse-index-sizein-memory-triple-index-sizein-memory-geospatial-region-index-sizein-memory-vector-index-sizetriple-index-geohash-precisionlarge-size-thresholdlockingjournalingjournal-sizejournal-countpreallocate-journalspreload-mapped-datapreload-replica-mapped-datarange-index-optimizepositions-list-max-sizeformat-compatibilityindex-detectionexpunge-lockstf-normalizationmerge-prioritymerge-max-sizemerge-min-sizemerge-vector-index-sizemerge-min-ratiomerge-timestamp
retain-until-backupmerge-blackoutsThis is a complex structure with the following children:
merge-blackoutThis is a complex structure with the following children:
blackout-typelimitmerge-prioritydaysThis is a complex structure with the following children:
dayperiodThis is a complex structure with the following children:
start-datestart-timeend-dateend-timedurationdatabase-backupsThis is a complex structure with the following children:
database-backupThis is a complex structure with the following children:
backup-idbackup-enabledbackup-directorybackup-kek-idbackup-typebackup-periodbackup-month-daybackup-daysThis is a complex structure with the following children:
backup-daybackup-start-datebackup-start-timebackup-timestampmax-backupsbackup-schemas-databasebackup-security-databasebackup-triggers-databaseinclude-replicasjournal-archivingjournal-archive-pathjournal-archive-lag-limitincremental-backupincremental-dirpurge-journal-archivefragment-rootsThis is a complex structure with the following children:
fragment-rootThis is a complex structure with the following children:
namespace-urilocalnamefragment-parentsThis is a complex structure with the following children:
fragment-parentThis is a complex structure with the following children:
namespace-urilocalnameelement-word-query-throughsThis is a complex structure with the following children:
element-word-query-throughThis is a complex structure with the following children:
namespace-urilocalnamephrase-throughsThis is a complex structure with the following children:
phrase-throughThis is a complex structure with the following children:
namespace-urilocalnamephrase-aroundsThis is a complex structure with the following children:
phrase-aroundThis is a complex structure with the following children:
namespace-urilocalnamerange-element-indexesThis is a complex structure with the following children:
range-element-indexThis is a complex structure with the following children:
scalar-typenamespace-urilocalnamecollationrange-value-positionsinvalid-valuesrange-element-attribute-indexesThis is a complex structure with the following children:
range-element-attribute-indexThis is a complex structure with the following children:
scalar-typeparent-namespace-uriparent-localnamenamespace-urilocalnamecollationrange-value-positionsinvalid-valueselement-word-lexiconsThis is a complex structure with the following children:
element-word-lexiconThis is a complex structure with the following children:
namespace-urilocalnamecollationelement-attribute-word-lexiconsThis is a complex structure with the following children:
element-attribute-word-lexiconThis is a complex structure with the following children:
parent-namespace-uriparent-localnamenamespace-urilocalnamecollationpath-namespacesThis is a complex structure with the following children:
path-namespaceThis is a complex structure with the following children:
prefixnamespace-urirange-path-indexesThis is a complex structure with the following children:
range-path-indexThis is a complex structure with the following children:
scalar-typepath-expressioncollationrange-value-positionsinvalid-valuesfieldsThis is a complex structure with the following children:
fieldThis is a complex structure with the following children:
field-nameinclude-rootfield-pathThis is a complex structure with the following children:
pathweightmetadatastemmed-searchesword-searchesfield-value-searchesfield-value-positionsfast-phrase-searchesfast-case-sensitive-searchesfast-diacritic-sensitive-searchestrailing-wildcard-searchestrailing-wildcard-word-positionsthree-character-searchesthree-character-word-positionstwo-character-searchesone-character-searchesword-lexiconsThis is a complex structure with the following children:
word-lexiconincluded-elementsThis is a complex structure with the following children:
included-elementThis is a complex structure with the following children:
namespace-urilocalnameweightattribute-namespace-uriattribute-localnameattribute-valueexcluded-elementsThis is a complex structure with the following children:
excluded-elementThis is a complex structure with the following children:
namespace-urilocalnameattribute-namespace-uriattribute-localnameattribute-valuetokenizer-overridesThis is a complex structure with the following children:
tokenizer-overrideThis is a complex structure with the following children:
charactertokenizer-classrange-field-indexesThis is a complex structure with the following children:
range-field-indexThis is a complex structure with the following children:
scalar-typefield-namecollationrange-value-positionsinvalid-valuesgeospatial-element-indexesThis is a complex structure with the following children:
geospatial-element-indexThis is a complex structure with the following children:
namespace-urilocalnamecoordinate-systempoint-formatrange-value-positionsinvalid-valuesgeospatial-element-child-indexesThis is a complex structure with the following children:
geospatial-element-child-indexThis is a complex structure with the following children:
parent-namespace-uriparent-localnamenamespace-urilocalnamecoordinate-systempoint-formatrange-value-positionsinvalid-valuesgeospatial-element-pair-indexesThis is a complex structure with the following children:
geospatial-element-pair-indexThis is a complex structure with the following children:
parent-namespace-uriparent-localnamelatitude-namespace-urilatitude-localnamelongitude-namespace-urilongitude-localnamecoordinate-systemrange-value-positionsinvalid-valuesgeospatial-element-attribute-pair-indexesThis is a complex structure with the following children:
geospatial-element-attribute-pair-indexThis is a complex structure with the following children:
parent-namespace-uriparent-localnamelatitude-namespace-urilatitude-localnamelongitude-namespace-urilongitude-localnamecoordinate-systemrange-value-positionsinvalid-valuesgeospatial-path-indexesThis is a complex structure with the following children:
geospatial-path-indexThis is a complex structure with the following children:
path-expressioncoordinate-systempoint-formatrange-value-positionsinvalid-valuesgeospatial-region-path-indexesThis is a complex structure with the following children:
geospatial-region-path-indexThis is a complex structure with the following children:
path-expressioncoordinate-systemunitsgeohash-precisioninvalid-valuesdefault-rulesetsThis is a complex structure with the following children:
default-rulesetThis is a complex structure with the following children:
locationdatabase-replicationThis is a complex structure with the following children:
foreign-replicasThis is a complex structure with the following children:
foreign-replicaThis is a complex structure with the following children:
foreign-cluster-nameforeign-database-nameconnect-forests-by-namelag-limitreplication-enabledqueue-sizeforeign-masterThis is a complex structure with the following children:
foreign-cluster-nameforeign-database-nameconnect-forests-by-namedatabase-referencesThis is a complex structure with the following children:
database-referenceThis is a complex structure with the following children:
reference-cluster-namereference-database-namerebalancer-enablerebalancer-throttleassignment-policyThis is a complex structure with the following children:
assignment-policy-namepartition-keyThis is a complex structure with the following children:
cts:base-referencelower-bound-includeddefault-partitionshutdown-on-storage-failurestorage-failure-timeout
curl -X PUT --anyauth -u admin:admin --header "Content-Type:application/json" \
-d '{"fast-element-phrase-searches":false}' \
http://localhost:8002/manage/v2/databases/Documents/properties
==> Sets the "fast-element-phrase-searches" property to false on the Documents database.
curl -X PUT --anyauth -u admin:admin --header "Content-Type:application/xml" -d '<database-properties xmlns="http://marklogic.com/manage"><fast-phrase-searches>true</fast-phrase-searches></database-properties>' http://localhost:8002/manage/v2/databases/MyNewDatabase/properties
curl -X PUT --anyauth -u admin:admin --header "Content-Type:application/xml" -d '<database-properties xmlns="http://marklogic.com/manage"><database-backups><database-backup><backup-enabled>true</backup-enabled><backup-directory>/home/backups/Documents</backup-directory><backup-type>weekly</backup-type><backup-period>1</backup-period><backup-days><backup-day>sunday</backup-day></backup-days><backup-start-time>00:00:00</backup-start-time><backup-timestamp>2021-05-31T15:05:42.8254819+08:00</backup-timestamp><max-backups>2</max-backups><backup-security-database>true</backup-security-database><backup-schemas-database>true</backup-schemas-database><backup-triggers-database>true</backup-triggers-database><include-replicas>true</include-replicas><incremental-backup>false</incremental-backup><journal-archiving>false</journal-archiving><journal-archive-path/><journal-archive-lag-limit>15</journal-archive-lag-limit></database-backup></database-backups></database-properties>' http://localhost:8002/manage/v2/databases/MyNewDatabase/properties
==> Sets the "fast-element-phrase-searches" property to false on the Documents database.
curl -X PUT --digest -u admin:admin -H "Content-type: application/json" \
-d '{
"database-backup":[
{"backup-id":"2889081595792328957",
"backup-enabled":true,
"backup-directory":"/home/backups/Documents",
"backup-type":"weekly",
"backup-period":1,
"backup-day":["sunday"],
"backup-start-time":"00:00:00-08:00",
"backup-timestamp":"2015-12-22T11:01:25.081669-08:00",
"max-backups":2,
"backup-security-database":true,
"backup-schemas-database":true,
"backup-triggers-database":true,
"include-replicas":true,
"incremental-backup":false,
"journal-archiving":false,
"journal-archive-path":"",
"journal-archive-lag-limit":15}
]
}' \
http://localhost:8002/manage/v2/databases/Documents/properties
==> Sets the Documents database to be backed up every week on
Sunday at 12:00am.